package epoverty;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import com.mysql.jdbc.ResultSetMetaData;
import java.awt.*;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.table.DefaultTableModel;

public class CharityFunds extends JPanel
{

   CharityFunds(JTabbedPane tabs) throws SQLException, ClassNotFoundException
   {
        //Query for account deposits - DB
        String getDepositsQuery = ("select d.donationID,o.donorid,o.fundraiserid,DATE_FORMAT(o.donationdate,'%m-%d-%Y') as Date,d.amount "
                                 + "from deposits d "
                                 + "inner join donations o on d.donationid = o.donationid "
                                 + "where accountid = 3");
        //Query for withdrawls for the account - DB
        String getWithdrwalsQuery = ("select * from withdrawals "
                                   + "where accountid = 3");
        //Query for account balance - DB
        String getAcctBalanceQuery = ("select balance from accounts where accountid = 3");
        
        FundsClass overhead = new FundsClass(tabs, getDepositsQuery, getWithdrwalsQuery, getAcctBalanceQuery);
   }
}